package com.example.mytayunapi.Service;

import com.example.mytayunapi.Entity.conversationInfo;
import com.example.mytayunapi.Entity.messageInfo;
import com.example.mytayunapi.Mapper.conversationInfoMapper;
import com.example.mytayunapi.Vo.ConversionProductUser;
import org.apache.logging.log4j.message.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.security.auth.message.MessageInfo;
import java.util.List;

@Service
public class conversationInfoServiceImpl implements conversationInfoService {
    @Autowired
    private conversationInfoMapper conversationinfomapper;

    @Override
    public List<ConversionProductUser> getAllConversion(String User_id) {
        return conversationinfomapper.getAllConversion(User_id);
    }

    @Override
    public List<messageInfo> getMessageByConversation(Integer Conversation_id) {
        return conversationinfomapper.getMessageByConversation(Conversation_id);
    }

    @Override
    public Integer insertMessage(messageInfo messageinfo) {
        return conversationinfomapper.insertMessage(messageinfo);
    }

    @Override
    public Integer insertConversation(conversationInfo conversationInfo) {
        return conversationinfomapper.insertConversation(conversationInfo);
    }


}
